package com.njtoyo.taxi.admin.mapper.master.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.njtoyo.taxi.admin.mapper.master.enums.DriverAcceptCallCtg;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author Dell
 * @since 2021-07-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "Driver对象", description = "")
@Accessors(chain = true)
public class Driver implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private String name;

    private String mobileNumber;

    private String password;

    private String avatarUrl;

    private Long taxiId;

    private Long driverRegionId;

    @ApiModelProperty(value = "运营区")
    private Long cantonId;

    private Long locateCityId;

    @ApiModelProperty(value = "是否激活")
    private Boolean isActive;

    @ApiModelProperty(value = "是否在服务中")
    private Boolean inService;

    @ApiModelProperty(value = "是否换班司机")
    private Boolean isSubstitute;

    @ApiModelProperty(value = "设备信息")
    private String deviceInfo;

    @ApiModelProperty(value = "评价分数")
    private BigDecimal markScore;

    @ApiModelProperty(value = "听单类型：0.all；1.onlyRealtime；2.onlyAppointment")
    private DriverAcceptCallCtg acceptCallCtg;

    @ApiModelProperty(value = "实时单听单范围")
    private BigDecimal realtimeCallDistanceRange;

    @ApiModelProperty(value = "是否自动抢单（仅实时单可用）")
    private Boolean isAutomatic;

    @ApiModelProperty(value = "自动抢单范围")
    private BigDecimal automaticOrderRange;

    @ApiModelProperty(value = "entityName")
    private String entityName;

    @ApiModelProperty(value = "是否已离职：0:未离职，1:已离职")
    private Boolean isLeave;

    @ApiModelProperty(value = "离职时间")
    private Date leaveTime;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createdAt;

    @ApiModelProperty(value = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updatedAt;

    private String refreshToken;

    private String banReason;
}
